package com.ly.heart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ly.common.core.domain.AjaxResult;
import com.ly.heart.domain.KingFinanceReceiptBillEntity;
import com.ly.heart.domain.KingFinanceReceiptSettlementBillEntity;
import com.ly.heart.domain.dto.KingFinanceReceiptBillDto;
import com.ly.heart.domain.dto.KingFinanceReceiptBillReciteDto;
import com.ly.heart.domain.vo.KingFinanceReceiptBillVo;

/**
 * 财务模块-应收票据,推金蝶Service接口
 *
 * @author wutao
 * @date 2024-06-19
 */
public interface IKingFinanceReceiptBillService extends IService<KingFinanceReceiptBillEntity> {

    /**
     * 查询财务模块-应收票据,推金蝶
     *
     * @param id 财务模块-应收票据,推金蝶ID
     * @return 财务模块-应收票据,推金蝶
     */
    KingFinanceReceiptBillEntity selectKingFinanceReceiptBillEntityById ( String id );

    /**
     * 查询财务模块-应收票据,推金蝶列表
     *
     * @param kingFinanceReceiptBillEntity 财务模块-应收票据,推金蝶
     * @return 财务模块-应收票据,推金蝶集合
     */
    AjaxResult selectKingFinanceReceiptBillEntityList ( KingFinanceReceiptBillEntity kingFinanceReceiptBillEntity );

    /**
     * 新增财务模块-应收票据,推金蝶
     *
     * @param kingFinanceReceiptBillEntity 财务模块-应收票据,推金蝶
     * @return 结果
     */
    AjaxResult draft ( KingFinanceReceiptBillEntity kingFinanceReceiptBillEntity );

    AjaxResult submit ( KingFinanceReceiptBillEntity kingFinanceReceiptBillEntity );

    AjaxResult approve ( String id );

    /**
     * 修改财务模块-应收票据,推金蝶
     *
     * @param kingFinanceReceiptBillEntity 财务模块-应收票据,推金蝶
     * @return 结果
     */
    AjaxResult updateKingFinanceReceiptBillEntity ( KingFinanceReceiptBillEntity kingFinanceReceiptBillEntity );

    /**
     * 拆分应收票据
     *
     * @param kingFinanceReceiptBillDto
     * @return
     */
    AjaxResult split ( KingFinanceReceiptBillDto kingFinanceReceiptBillDto );

    /**
     * 背书
     *
     * @param kingFinanceReceiptBillReciteDto
     * @return
     */
    AjaxResult recite ( KingFinanceReceiptBillReciteDto kingFinanceReceiptBillReciteDto );

    /**
     * 获取背书退回的数据：应收票据基础数据+背书明细列表
     * @param id
     * @return
     */
    KingFinanceReceiptBillVo getReciteRefund (String id);

    /**
     * 背书退回
     *
     * @param kingFinanceReceiptBillReciteDto
     * @return
     */
    AjaxResult reciteRefund ( KingFinanceReceiptBillReciteDto kingFinanceReceiptBillReciteDto );

    /**
     * 退票
     *
     * @param kingFinanceReceiptSettlementBillEntity
     * @return
     */
    AjaxResult refund ( KingFinanceReceiptSettlementBillEntity kingFinanceReceiptSettlementBillEntity );

    /**
     * 贴现
     *
     * @param kingFinanceReceiptSettlementBillEntity
     * @return
     */
    AjaxResult discount ( KingFinanceReceiptSettlementBillEntity kingFinanceReceiptSettlementBillEntity );

    /**
     * 到期收款
     *
     * @param kingFinanceReceiptSettlementBillEntity
     * @return
     */
    AjaxResult receipt ( KingFinanceReceiptSettlementBillEntity kingFinanceReceiptSettlementBillEntity );

    /**
     * 应收票据质押
     *
     * @param kingFinanceReceiptSettlementBillEntity
     * @return
     */
    AjaxResult pledge ( KingFinanceReceiptSettlementBillEntity kingFinanceReceiptSettlementBillEntity );

    /**
     * 应收票据质押
     *
     * @param kingFinanceReceiptSettlementBillEntity
     * @return
     */
    AjaxResult unPledge ( KingFinanceReceiptSettlementBillEntity kingFinanceReceiptSettlementBillEntity );

    /**
     * 批量删除财务模块-应收票据,推金蝶
     *
     * @param ids 需要删除的财务模块-应收票据,推金蝶ID
     * @return 结果
     */
    AjaxResult deleteKingFinanceReceiptBillEntityByIds ( String[] ids );

    /**
     * 删除财务模块-应收票据,推金蝶信息
     *
     * @param id 财务模块-应收票据,推金蝶ID
     * @return 结果
     */
    int deleteKingFinanceReceiptBillEntityById ( String id );

}
